home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / dev / cross / sasmv14.dms / sasmv14.adf / examples / cpu.s < prev    next >
Text File  |  1993-05-22  |  4KB  |  287 lines

  1.  
  2. *****************************************************************************
  3. *                                                                           *
  4. * Famicon CPU G65SC802 / G65SC816 InstructionSet                            *
  5. * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                            *
  6. * Compiled by Carnivore/BeerMacht on 23-Aug-92 using BeerMon V0.43          *
  7. *                                                                           *
  8. * updated 02/Feb/1993 by Infernal Byte Systems, INC.                        *
  9. * some minor bugs corrected & added just a valid SASM © 1993 by IBS header  *
  10. *                                                                           *
  11. * FreeWare!                                                                 *
  12. *                                                                           *
  13. *****************************************************************************
  14.  
  15.     heap O=32k
  16.  
  17.     hrom                ;just a little example for hirom
  18.     *=$400000            ;assembly...
  19.  
  20.     sep    #$30            ;a,x,y:8bit
  21.     adc    #$12
  22.     adc    $12
  23.     adc    $12,x
  24.     adc    ($12)
  25.     adc    ($12,x)
  26.     adc    ($12),y
  27.     adc    [$12]
  28.     adc    [$12],y
  29.     adc    $1234
  30.     adc    $1234,x
  31.     adc    $1234,y
  32.     adc    $123456
  33.     adc    $123456,x
  34.     adc    $12,s
  35.     adc    ($12,s),y
  36.     and    #$12
  37.     and    $12
  38.     and    $12,x
  39.     and    ($12)
  40.     and    ($12,x)
  41.     and    ($12),y
  42.     and    [$12]
  43.     and    [$12],y
  44.     and    $1234
  45.     and    $1234,x
  46.     and    $1234,y
  47.     and    $123456
  48.     and    $123456,x
  49.     and    $12,s
  50.     and    ($12,s),y
  51.     asl    a
  52.     asl    $12
  53.     asl    $12,x
  54.     asl    $1234
  55.     asl    $1234,x
  56.     bit    #$12
  57.     bit    $12
  58.     bit    $12,x
  59.     bit    $1234
  60.     bit    $1234,x
  61.     cmp    #$12
  62.     cmp    $12
  63.     cmp    $12,x
  64.     cmp    ($12)
  65.     cmp    ($12,x)
  66.     cmp    ($12),y
  67.     cmp    [$12]
  68.     cmp    [$12],y
  69.     cmp    $1234
  70.     cmp    $1234,x
  71.     cmp    $1234,y
  72.     cmp    $123456
  73.     cmp    $123456,x
  74.     cmp    $12,s
  75.     cmp    ($12,s),y
  76.     cpx    #$12
  77.     cpx    $12
  78.     cpx    $1234
  79.     cpy    #$12
  80.     cpy    $12
  81.     cpy    $1234
  82.     dec    a
  83.     dec    $12
  84.     dec    $12,x
  85.     dec    $1234
  86.     dec    $1234,x
  87.     eor    #$12
  88.     eor    $12
  89.     eor    $12,x
  90.     eor    ($12)
  91.     eor    ($12,x)
  92.     eor    ($12),y
  93.     eor    [$12]
  94.     eor    [$12],y
  95.     eor    $1234
  96.     eor    $1234,x
  97.     eor    $1234,y
  98.     eor    $123456
  99.     eor    $123456,x
  100.     eor    $12,s
  101.     eor    ($12,s),y
  102.     inc    a
  103.     inc    $12
  104.     inc    $12,x
  105.     inc    $1234
  106.     inc    $1234,x
  107.     lda    #$12
  108.     lda    $12
  109.     lda    $12,x
  110.     lda    ($12)
  111.     lda    ($12,x)
  112.     lda    ($12),y
  113.     lda    [$12]
  114.     lda    [$12],y
  115.     lda    $1234
  116.     lda    $1234,x
  117.     lda    $1234,y
  118.     lda    $123456
  119.     lda    $123456,x
  120.     lda    $12,s
  121.     lda    ($12,s),y
  122.     ldx    #$12
  123.     ldx    $12
  124.     ldx    $12,y
  125.     ldx    $1234
  126.     ldx    $1234,y
  127.     ldy    #$12
  128.     ldy    $12
  129.     ldy    $12,x
  130.     ldy    $1234
  131.     ldy    $1234,x
  132.     lsr    $12
  133.     lsr    $12,x
  134.     lsr    $1234
  135.     lsr    $1234,x
  136.     ora    #$12
  137.     ora    $12
  138.     ora    $12,x
  139.     ora    ($12)
  140.     ora    ($12,x)
  141.     ora    ($12),y
  142.     ora    [$12]
  143.     ora    [$12],y
  144.     ora    $1234
  145.     ora    $1234,x
  146.     ora    $1234,y
  147.     ora    $123456
  148.     ora    $123456,x
  149.     ora    $12,s
  150.     ora    ($12,s),y
  151.     rol    a
  152.     rol    $12
  153.     rol    $12,x
  154.     rol    $1234
  155.     rol    $1234,x
  156.     ror    a
  157.     ror    $12
  158.     ror    $12,x
  159.     ror    $1234
  160.     ror    $1234,x
  161.     sbc    #$12
  162.     sbc    $12
  163.     sbc    $12,x
  164.     sbc    ($12)
  165.     sbc    ($12,x)
  166.     sbc    ($12),y
  167.     sbc    [$12]
  168.     sbc    [$12],y
  169.     sbc    $1234
  170.     sbc    $1234,x
  171.     sbc    $1234,y
  172.     sbc    $123456
  173.     sbc    $123456,x
  174.     sbc    $12,s
  175.     sbc    ($12,s),y
  176.     sta    $12
  177.     sta    $12,x
  178.     sta    ($12)
  179.     sta    ($12,x)
  180.     sta    ($12),y
  181.     sta    [$12]
  182.     sta    [$12],y
  183.     sta    $1234
  184.     sta    $1234,x
  185.     sta    $1234,y
  186.     sta    $123456
  187.     sta    $123456,x
  188.     sta    $12,s
  189.     sta    ($12,s),y
  190.     stx    $12
  191.     stx    $12,y
  192.     stx    $1234
  193.     sty    $12
  194.     sty    $12,x
  195.     sty    $1234
  196.     stz    $12
  197.     stz    $12,x
  198.     stz    $1234
  199.     stz    $1234,x
  200.     trb    $12
  201.     trb    $1234
  202.     tsb    $12
  203.     tsb    $1234
  204.     rep    #$30            ;a,x,y:16bit
  205.     adc    #$1234
  206.     and    #$1234
  207.     bit    #$1234
  208.     cmp    #$1234
  209.     cpx    #$1234
  210.     cpy    #$1234
  211.     eor    #$1234
  212.     lda    #$1234
  213.     ldx    #$1234
  214.     ldy    #$1234
  215.     ora    #$1234
  216.     sbc    #$1234
  217.     sep    #$30            ;a,x,y:8bit
  218.     bcc    $4001e5
  219.     bcs    $4001e5
  220.     beq    $4001e5
  221.     bmi    $4001e5
  222.     bne    $4001e5
  223.     bpl    $4001e5
  224.     bra    $4001e5
  225.     bvc    $4001e5
  226.     bvs    $4001e5
  227.     clc
  228.     cld
  229.     cli
  230.     clv
  231.     dex
  232.     dey
  233.     inx
  234.     iny
  235.     nop
  236.     pea    $1234
  237.     pei    ($12)
  238.     per    $400205
  239.     pha
  240.     phb
  241.     phd
  242.     phk
  243.     php
  244.     phx
  245.     phy
  246.     pla
  247.     plb
  248.     pld
  249.     plp
  250.     plx
  251.     ply
  252.     sec
  253.     sed
  254.     sei
  255.     tax
  256.     tay
  257.     tcd
  258.     tdc
  259.     tsc
  260.     tsx
  261.     txa
  262.     txs
  263.     txy
  264.     tya
  265.     xce
  266.     brk    #$12
  267.     brl    $400225
  268.     cop    #$12
  269.     jmp    ($1234)
  270.     jmp    $1234
  271.     jmp    ($1234,x)
  272.     jml    ($1234)
  273.     jml    $123456
  274.     jsl    $123456
  275.     jsr    $1234
  276.     jsr    ($1234,x)
  277.     mvn    #$12,#$34
  278.     mvp    #$12,#$34
  279.     rep    #$30
  280.     rti
  281.     rtl
  282.     rts
  283.     sep    #$30            ;a,x,y:8bit
  284.     stp
  285.     wai
  286.     xba
  287.